<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="0">
  <title>修改ECPM配置</title>
  <style>
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      display: flex;
      height: 100vh;
    }

    .left-panel {
      width: 20%;
      background-color: #f4f4f4;
      padding: 20px;
      box-sizing: border-box;
    }

    .right-panel {
      width: 80%;
      padding: 20px;
      box-sizing: border-box;
      overflow-y: auto;
    }

    button {
      display: block;
      width: 100%;
      padding: 10px;
      margin-bottom: 10px;
      background-color: #007bff;
      color: white;
      border: none;
      border-radius: 5px;
      cursor: pointer;
    }

    button:hover {
      background-color: #0056b3;
    }

    .data-list {
      list-style-type: none;
      padding: 0;
      white-space: pre-wrap;
    }

    .data-list li {
      background-color: #e9ecef;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 5px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
      /* 添加一些间距 */
    }

    th,
    td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: left;
    }

    th {
      background-color: #f2f2f2;
    }
  </style>
</head>

<body>
  <!-- 左侧按钮 -->
  <div class="left-panel">
    
    <p style="text-align: center; font-weight: bold; margin-bottom: 20px;">抖音游戏：修改配置</p>
    
    <button id="btn9">冒险轻梦1.0.2旧版本</button>
    <button id="btn10">冒险轻梦1.0.3以后版本</button>

    <button id="btn11">终极王者</button>
    <button id="btn12">自由维度</button>
    <button id="btn13">咕噜冒险</button>
    <button id="btn14">悠哉时光</button>

    <button id="btn15">出招吧老弟</button>
    <button id="btn16">轻松远征队</button>

    <button id="btn17">无压时刻</button>
    <button id="btn18">黄金秘境</button>
    <button id="btn19">悠闲大冒险</button>
    <button id="btn20">治愈探索者</button>

    <button id="btn21">无事小神仙</button>
    <button id="btn22">迷途灯塔</button>
    <button id="btn23">万物絮语</button>
    <button id="btn24">纸境奇谭</button>
    <button id="btn25">迷雾试炼</button>

  </div>

  <!-- 右侧数据展示 -->
  <div class="right-panel">
    <div id="data-list" class="data-list"></div>
  </div>

  <!-- 引入 fetchData.js 文件 -->
  <script type="module">
    import { fetchData, showInputForQueryActive, queryLog, fetchStreamData, modifyGameConfig } from './fetchData.js?v=1.0.1';

    // 获取按钮
    const btn9 = document.getElementById('btn9');
    btn9.addEventListener('click', () => modifyGameConfig(""));
    const btn10 = document.getElementById('btn10');
    btn10.addEventListener('click', () => modifyGameConfig("H5JustGoGoGoTT"));

    const btn11 = document.getElementById('btn11');
    btn11.addEventListener('click', () => modifyGameConfig("DawnJourneyTT"));
    const btn12 = document.getElementById('btn12');
    btn12.addEventListener('click', () => modifyGameConfig("WarriorVanguardTT"));
    const btn13 = document.getElementById('btn13');
    btn13.addEventListener('click', () => modifyGameConfig("GuruAdventureTT"));
    const btn14 = document.getElementById('btn14');
    btn14.addEventListener('click', () => modifyGameConfig("EmotionalHealingTT"));

    const btn15 = document.getElementById('btn15');
    btn15.addEventListener('click', () => modifyGameConfig("ImmortalPathTTCZBLD"));
    const btn16 = document.getElementById('btn16');
    btn16.addEventListener('click', () => modifyGameConfig("ImmortalPathTTQSYZD"));

    const btn17 = document.getElementById('btn17');
    btn17.addEventListener('click', () => modifyGameConfig("HappyFoodDeliveryTT"));
    const btn18 = document.getElementById('btn18');
    btn18.addEventListener('click', () => modifyGameConfig("GoldenRealmTT"));
    const btn19 = document.getElementById('btn19');
    btn19.addEventListener('click', () => modifyGameConfig("EasyAdventureTT"));
    const btn20 = document.getElementById('btn20');
    btn20.addEventListener('click', () => modifyGameConfig("HealingExplorerTT"));

    const btn21 = document.getElementById('btn21');
    btn21.addEventListener('click', () => modifyGameConfig("ChineseCharacterBattleTT"));
    const btn22 = document.getElementById('btn22');
    btn22.addEventListener('click', () => modifyGameConfig("SeaKingTT"));
    const btn23 = document.getElementById('btn23');
    btn23.addEventListener('click', () => modifyGameConfig("WaterGunBrawlTT"));
    const btn24 = document.getElementById('btn24');
    btn24.addEventListener('click', () => modifyGameConfig("TowerDefenseBattleTT"));
    const btn25 = document.getElementById('btn25');
    btn25.addEventListener('click', () => modifyGameConfig("ApocalypseSurvivalNotesTT"));

    // 解析URL参数
    function getQueryParam(param) {
      const urlParams = new URLSearchParams(window.location.search);
      return urlParams.get(param);
    }
  </script>
</body>

</html>